import {onMounted, ref} from 'vue'
import {getBannerAPI} from '@/apis/home.js'

export function  useBanner () {
    const bannerList = ref([])
    const getBannerList = async () => {
        const {data} = await  getBannerAPI({distributionSite: '2'})
        // console.log(data)
        bannerList.value = data.result
        // console.log(bannerList.value)
      }
      onMounted(()=>{
          getBannerList()
      })
      return bannerList
      
}
